package yl.hs.bmipfull.controllers.construction;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import yl.hs.bmipfull.controllers.ControllerBase;
import yl.hs.bmipfull.service.construction.IConstructionDashboardService;
import yl.hs.bmipfull.viewmodels.WebResult;

/**
 * @author 韩纪旺
 * @apiNote
 * @since 2022/11/21 14:47 创建
 */
@RequestMapping("/construction/Dashboard")
@Api(value = "工地系统", tags = "工地系统——仪表盘")
@RestController
public class ConstructionDashboardController extends ControllerBase {

    @Autowired
    IConstructionDashboardService service;

    @RequestMapping(value = "dataIndicators",method =RequestMethod.GET)
    @ApiOperation(value = "数据指标", notes = "数据指标" )
    public WebResult GetNotSignedCount(){

        try {
            return success("ok",service.dataIndicators());
        } catch (Exception e) {
            return error(e);
        }

    }
    @RequestMapping(value = "weightMoneyMonthly",method =RequestMethod.GET)
    @ApiOperation(value = "每月发货金额、重量", notes = "每月发货金额、重量" )
    public WebResult weightMoneyMonthly(){
        return success("ok",service.weightMoneyMonthly());
    }
}
